package cn.personal.library.view;

import android.content.Context;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.widget.LinearLayout;


public class CanDisableLinearLayout extends LinearLayout {
    public CanDisableLinearLayout(Context context) {
        super(context);
    }

    public CanDisableLinearLayout(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    public CanDisableLinearLayout(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
    }

    @Override
    public boolean onInterceptTouchEvent(MotionEvent ev) {
        if (!isEnabled()) {
            return true;
        }
        return super.onInterceptTouchEvent(ev);
    }
}
